<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			function fac(n,out){
				var s=1;
				for(var i=1;i<=n;i++){
					s=s*i;
				}
				out(s);
			}
			function o(s){
				alert("阶乘为"+s);
			}
//			fac(5,function(x){
//				console.log("---------",x);
//			});
            fac(9,o);

		</script>
	</body>
</html>
